home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
jaz_clib.arc
/
READSECT.C
< prev
next >
Wrap
Text File
|
1989-04-09
|
609b
|
31 lines
readsect(fnum , ftrack , fsector , fhead , fdrive , fbuf )
int fnum , ftrack , fsector , fhead , fdrive;
char *fbuf;
{
union REGS win,wout;
struct SREGS wsegreg;
segread(&wsegreg); /* get register values */
win.x.bx = (int) fbuf;
win.h.ah = 2;
win.h.al = fnum;
win.h.ch = ftrack;
win.h.cl = fsector;
win.h.dh = fhead;
win.h.dl = fdrive;
#if DEBUG
printf("\n%04x %04x %04x %04x %04x",win.x.ax,win.x.bx,
win.x.cx,win.x.dx,wsegreg.es);
#endif
int86x(0x13,&win,&wout,&wsegreg);
if (wout.x.cflag & 1 == 1) return(-1);
else return(0);
}